package com.idheima.Param;

import java.util.Arrays;

public class Test {
    public static void test(int...a){
        int sum = 0;
        for (int i = 0; i < a.length; i++) {
            sum = sum + a[i];
        }
        System.out.println(sum);
    }
    public static void main(String[] args) {
        test(1,2,3,4,5,6,7,8,9,10);
        test(1,2,3);
    }
}
